#include <iostream>
#include <vector>
using namespace std;

bool func(vector<int>::iterator b, vector<int>::iterator e, int i) {
  while (b != e) {
    if (*b != i)
      b++;
    else {
      return true;
    }
  }
  return false;
}

int main(int argc, char const *argv[]) {
  /* code */
  vector<int> v = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  cout << func(v.begin(), v.end(), 511) << endl;
  return 0;
}
